<?php
/**
 * Created by viva.
 * User: xj
 * Tel:  13675170078
 * Date: 2015/6/8
 * Time: 16:46
 */

namespace Home\Controller;

use Think\Model;

class StrategyController extends CommonController
{
    public $result;

    public function __construct(Model $model)
    {
        $this->indexSearch($model);
    }

    public function add(Model $model)
    {

    }

    private function  indexSearch(Model $model)
    {
        $where['status'] = 1;
        $where['start_time'] = array(array('ELT', time()), array('eq', 0), 'or');
        $where['end_time'] = array(array('EGT', time()), array('eq', 0), 'or');
        $this->result = $model->where($where)->order('sort desc')->select();
    }


}